package de.koller.aframe.util.node;

import de.koller.oceanFramework.OceanException;
import de.koller.oceanFramework.tree.ISea3;
import de.koller.oceanFramework.tree.Sea3X;

public class NodeA extends Sea3X {
	
	protected boolean exceptionUpdateFailS = true;
	
	public final void secondaryUpdate() {
		this.updateS();
		
		for( ISea3 s : this.getSeas() )
			if( s instanceof NodeA ) {
				NodeA n = (NodeA)s;
				n.secondaryUpdate();
			} else
				if( exceptionUpdateFailS )
					throw new OceanException( s.toString() + " is not an NodeA! " +
							" Set 'exceptionUpdateFailS' to false." );
		
		this.postUpdateS();
	}
	
	protected void updateS() {
		
	}
	
	protected void postUpdateS() {
		
	}
	
}
